package com.bian.task.service;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @author bianpengfei
 * @create 2019-02-06 16:01
 **/
@Service
public class ScheduleService {

    /**
     *  second（秒）, minute（分）, hour（时）, day of month（日）, month （月）， day of week（周几）.
     *  0 * * * * MON-FRI
     * */
//    @Scheduled(cron = "0,1,2,3,4,5,6,7 * * * * MON-SAT")
    @Scheduled(cron = "0/4 * * * * MON-SAT")  // 每四秒执行一次
    public void hello() {
        System.out.println("你好");
    }

}
